home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #11 / Amiga Plus CD - 2004 - No. 11.iso / AmiSoft / Util / conv / Acvt.lha / Acvt 1.07 / sources / cdsk_dcm.h < prev    next >
C/C++ Source or Header  |  1999-06-10  |  2KB  |  73 lines

  1. //    This program is free software; you can redistribute it and/or modify
  2. //    it under the terms of the GNU General Public License as published by
  3. //    the Free Software Foundation; either version 2 of the License, or
  4. //    any later version.
  5. //
  6. //    This program is distributed in the hope that it will be useful,
  7. //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  9. //    GNU General Public License for more details.
  10. //
  11. //    You should have received a copy of the GNU General Public License
  12. //    along with this program; if not, write to the Free Software
  13. //    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  14. //
  15.  
  16. #ifndef __CDCM_H__
  17. #define __CDCM_H__
  18.  
  19. #include "errbase.h"
  20. #include "wintypes.h"
  21. #include "cdisk.h"
  22. #include "cfile.h"
  23. #include "cprefile.h"
  24.  
  25. #define CDCM_FORMAT_VIOLATED ( CDCM_BASE + 0 )
  26.  
  27. class CDcm : public CDisk
  28. {
  29. public:
  30.                 CDcm();
  31.                 ~CDcm();
  32.  
  33.                 BOOL Load( char*, BOOL = FALSE, BOOL = FALSE );
  34.  
  35.                 BOOL Save( char*, BOOL );
  36.  
  37. private:
  38.  
  39.                 BOOL DecodeRec41( CGenFile& );
  40.                 BOOL DecodeRec42( CGenFile& );
  41.                 BOOL DecodeRec43( CGenFile& );
  42.                 BOOL DecodeRec44( CGenFile& );
  43.                 BOOL DecodeRec46( CGenFile& );
  44.                 BOOL DecodeRec47( CGenFile& );
  45.                 BOOL DecodeRecFA( CGenFile& );
  46.                 WORD ReadOffset( CGenFile& );
  47.  
  48.                 void EncodeRec41( BYTE*, int*, BYTE*, BYTE*, int );
  49.                 void EncodeRec43( BYTE*, int*, BYTE*, int );
  50.                 void EncodeRec44( BYTE*, int*, BYTE*, BYTE*, int );
  51.  
  52.                 void EncodeRec45();
  53.                 void EncodeRec46();
  54.                 void EncodeRec( BOOL );
  55.                 void EncodeRecFA( BOOL, int, int, int );
  56.  
  57.                 BOOL    m_bLastPass;
  58.                 BYTE    m_abtCurrBuff[ 0x100 ];
  59.                 BYTE    m_abtPrevBuff[ 0x100 ];
  60.                 int    m_iSectorSize;
  61.                 WORD    m_wCurrentSector;
  62.                 long    m_lFileLength;
  63.                 BOOL    m_bAlreadyFormatted;
  64.  
  65.  
  66.                 BYTE* m_pbtCurr;
  67.                 BYTE* m_pbtPass;
  68.                 BYTE*    m_pbtLastRec;
  69. };
  70.  
  71. #endif
  72.  
  73.